package com.xudow.app.dynamicstate_old.module.user;

import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.jude.beam.bijection.RequiresPresenter;
import com.jude.beam.expansion.list.BeamListActivity;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;
import com.jude.easyrecyclerview.decoration.DividerDecoration;
import com.jude.utils.JUtils;
import com.xudow.app.R;
import com.xudow.app.dynamicstate_old.domain.entity.AttentionUser;

/**
 * Created by ske on 2016/6/15.
 * 粉丝、关注
 */
@RequiresPresenter(AttentionListPresenter.class)
public class AttentionListActivity extends BeamListActivity<AttentionListPresenter, AttentionUser> {
    @Override
    public BaseViewHolder<AttentionUser> getViewHolder(ViewGroup parent, int viewType) {
        return new AttentionUserViewHolder(parent);
    }


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setup();
        getListView().addItemDecoration(new DividerDecoration(getResources().getColor(R.color.gray100), JUtils.dip2px(1)));
    }


    public void setTitle() {
        ((TextView) $(R.id.text_title)).setText("粉丝");
        $(R.id.text_title).setOnClickListener(v -> onBackPressed());
    }

    @Override
    public int getLayout() {
        return R.layout.activity_attention_user;
    }

    private void setup() {
        $(R.id.back).setOnClickListener(v -> onBackPressed());
    }
}
